import java.util.Date;

public class DeprecateExample {

	@Deprecated
	public static void displayMessage() {
		System.out.println("This method has been depricated");
	}

	public static void main(String[] args) {
		// calling depricated methods
		displayMessage();
		System.out.println();
		
		//Java api deprecated methods
		Date date = new Date();
		int day = date.getDay();
		int minutes = date.getMinutes();
		int month = date.getMonth();
		System.out.println("Using deprecated method to get day of the week:" + day);
		System.out.println("Using deprecated method to get current minutes:" + minutes);
		System.out.println("Using deprecated method to get month of the year:" + month);
	}
}
